var path = "/LanJuPublic";
var Htype = {
		"1" : "蓝居友家",
		"2" : "蓝居整租",
		"3" : "业主直租"
};

var myCl = ({
	initList:function(){
		$.ajax({
			type : "POST",
			dataType : 'json',
			url : path+"/house/queryMyHouseList.do",
			data : {
				"offset": offset,
				"limit": limit,
				"orderBy":"createTime",
				"table":"lj_collect",
			},
			success : function(data) {
				console.log(data);
				var html ="";
				if(data.rows.length>0){
					$(data.rows).each(function(i,n){
						html+="<li id='"+n.house.houseId+"'>"+
					"<img class='tuijian_house_content_img' src='"+(n.imglist.length==0?"":n.imglist[0].imgUrl)+"'>"+
					"<div class='house_title'>"+Htype[n.house.type]+"·"+((n.house.houseName.length>25)?(n.house.houseName.substring(0,25)+"..."):(n.house.houseName))+"</div>"+
					"<div class='house_title house_price'><span class='house_size'>"+n.house.houseSize+"平方</span><span class='house_type' style='margin-left: 25px;'>"+(n.house.houseLayout==undefined?"暂无房型":n.house.houseLayout)+"</span><span class='price' style='    float: right;    margin-right: 25px;'>"+n.house.price+"元/月</span></div>"+
					"<div class='house_title house_address'><span class='jiaotong'><img src='../images/postion.png' class='position'>"+n.house.specialNote+"</span> </div></li>";
					
					})
					$(".house_ul").append(html);
					$("#loadmore").hide();
	        		$(".page__desc").show();
				}else{
					offset = offset-limit;
					if($(".house_ul").children().length==0){
						$(".house_ul").html("<li style='text-align:center;background: #eee;'><img src=\"../../images/nondata.png\"></li><li style='text-align:center;background: #eee;'>暂无数据</li>");
					}else{
						$$.toast("无更多数据");
					}
					$("#loadmore").hide();
					$(".page__desc").hide();
				}
			}
		});
	},
})